package com.heima.article.controller.config;

import com.heima.article.controller.interceptor.CollectionInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @date 2024/8/21 17:44
 * @Author JinCc
 * @Description TODO
 * @Version 1.0
 */
@Configuration
public class WebMvcLikesCollectionConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new CollectionInterceptor()).addPathPatterns("/**");
    }
}
